﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using RbacLib.Entities;

namespace RbacLib.Mappers
{
	public class FunctionMap : ClassMap<Function>
    {
		public FunctionMap()
		{
			Id(x => x.Id);
							
													Map(x => x.CreateDate)												;			
					
													Map(x => x.UpdateDate)												;			
					
													Map(x => x.UpdateBy)												;			
					
													Map(x => x.Version)												;			
					
													Map(x => x.FuncName)						.Length(255)						;			
					
													Map(x => x.Description)						.Length(255)						;			
					
													Map(x => x.FunctionName)												;			
					
													Map(x => x.ProjectId)												;			
					
													References(x => x.Domain).Cascade.All();
					
					}

	}
}